# -*- coding: utf-8 -*-
# @Author : Yuan
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import JsonResponse


class LoginRequiredJsonMixin(LoginRequiredMixin):
    def handle_no_permission(self):
        return JsonResponse({'code': 0, 'errmsg': '用户未登录'})


